package com.fdsc.erp.weixin.Utils;

import javax.net.ssl.X509TrustManager;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

/**
 * @Description:信任管理器
 * @Author:lishanhui
 * @Date:Create in 11:24  2018-06-06
 **/
public class MyX509TrustManager implements X509TrustManager {
    //检查客户端证书
    @Override
    public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {

    }
    //检查服务器证书
    @Override
    public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {

    }
    //返回受信任的x509证书数组
    @Override
    public X509Certificate[] getAcceptedIssuers() {
        return new X509Certificate[0];
    }
}
